<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
		<meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
		<title>巡查</title>
		<link rel="stylesheet" type="text/css" href="../css/api.css"/>
		<link rel="stylesheet" type="text/css" href="../css/style.css"/>
		<style>
			html, body {
				background-color: #F5F6F6;
			}
			.content {
				margin-top: 10px;
			}
			.content td {
				border-bottom: 1px solid #DFE0E0;
				height: 60px;
			}
			.Add {
				height: 40px;
				width: 96%;
				background-color: #1ABC9C;
				color: white;
				text-align: center;
				font-size: 15px;
				margin-top: 20px;
				outline: none;
			}
			.ywc {
				background-image: url(../image/yiwancheng.png);
				background-size: 105px;
				background-position: center;
				background-repeat: no-repeat;
			}
			.ycs {
				background-image: url(../image/ycs.png);
				background-size: 105px;
				background-position: center;
				background-repeat: no-repeat;
			}
			.renming {
				background-color: #72EDD1;
				border: 1px solid #D0F9F0;
				padding: 10px 3px 10px 3px;
				color: #fff
			}
		</style>
	</head>
	<body>
		<div class="content" id="appsse">
			<div id="fadmin">
				<table width="100%">
					<tr v-for="value in object">
						<td>
						<p style="height: 20px;overflow: hidden" v-text="value.project_name">
						
						</p>
						<p v-text="value.sensor_name">
					
						</p></td>
						<td width="100" class="ycs">
						<p v-text="value.valve_id">
							
						</p>
						<p v-text="value.control_name">
							
						</p></td>
					
					</tr>
				</table>
			</div>
			<div id="admin">
			<div style="width: 33%;height: 20px;;float: left">
                <button style="border-radius :100px;background-color: #5B9BD5;width: 30px;height: 30px;margin-top: 5%;margin-left: 20%">
                </button>
                <span>远程手动</span>
            </div>
            <div style="width: 33%;height: 20px;;float: left">
                <button style="border-radius :100px;background-color: #5B9BD5;width: 30px;height: 30px;margin-top: 5%;margin-left: 20%">
                </button>
                <span>时间段</span>
            </div>
            <div style="width: 33%;height: 20px;;float: left">
                <button style="border-radius :100px;background-color: #5B9BD5;width: 30px;height: 30px;margin-top: 5%;margin-left: 20%">
                </button>
                <span>关联量</span>
            </div>
            <div style="width: 100%;height: 700px;">
            
            
            <div style="width: 90%;height: 300;border:3px solid skyblue;text-align: center;margin-left: 2%;margin-top: 5%;float: left;"  v-for="value in object">
                <button style="width: 150px;height: 45px;background-color: #5B9BD5;border-radius :10px;margin-top:5%">
               {{value.control_name}}
                </button>
                <button style="border-radius :100px;background-color: red;width: 30px;height: 30px;margin-top: 5%;margin-left: 20%">

                </button>

                <br>
                <br>
                <br>
                <table style="text-align: center">
                    <tr>
                        <td style="width: 6%"></td>
                        <td style="width: 2.5%">从</td>
                        <td style="width: 42.5%">{{value.timestart}}</td>
                        <td style="width: 2.5%">到</td>
                        <td style="width: 42.5%">{{value.timeend}}</td>
                    </tr>
                  
                    <tr>
                        <td style="width: 6%"></td>
                        <td style="width: 2.5%">从</td>
                        <td style="width: 42.5%">{{value.onetimestart}}</td>
                        <td style="width: 2.5%">到</td>
                        <td style="width: 42.5%">{{value.onetimeend}}</td>
                    </tr>
                   
                    <tr>
                        <td style="width: 6%"></td>
                        <td style="width: 2.5%">从</td>
                        <td style="width: 42.5%">{{value.totimestart}}</td>
                        <td style="width: 2.5%">到</td>
                        <td style="width: 42.5%">{{value.totimeend}}</td>
                    </tr>
                </table>
            </div>
            </div>
        </div>
       </div>
		</div>
		
		
		 
	</body>
	<script type="text/javascript" src="../../script/common.js"></script>

	<script src="../../script/jquery-1.11.0.min.js"></script>
	<script src="../../script/api.js"></script>
	<script type="text/javascript" src="../../script/vue.js"></script>
	<script type="text/javascript" src="../../script/jquery-1.11.0.min.js"></script>
	<script type="text/javascript">
		apiready = function() {
		var reg = $api.getStorage('userSession');
		var user=reg.data;
			if(user.role=='admin'){
				$("#fadmin").hide();
			}else{
				$("#admin").hide();
			}
			var app = new Vue({
				el : '#appsse',
				data : {
					object : []
				},
				created : function() {
				var ret = $api.getStorage('selectpor');
				var projectidsss = ret.id;	
				var uuisid = reg.data.id;	
				var uesid = reg.data.depart.id;
				var sids = reg.data.role.roleCode;
					api.ajax({
						url : BaseServiceUrl + 'mobile/config/list.json',
						method : 'post',
						dataType : 'json',
						 data: {
               				 values: {
							
              		 	 	}
           		 		}	
					}, function(ret, err) {
						
							//alert(JSON.stringify(ret))
							for (var i = 0; i < ret.length; i++) {
								app.object.push(ret[i]);
							}
						
					});
				}
			})
			
 					
               

		}
	


	
	</script>
</html>